package com.yanyeori.webtest.service.impl.redistest;

import com.yanyeori.framework.core.util.JacksonUtil;
import com.yanyeori.framework.redis.listener.RedisListener;
import com.yanyeori.webtest.entity.clear.BankEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author chenkuan
 * @version v1.0
 * @desc
 * @date 20/08/17 017 11:48
 */
@Slf4j
@Service
public class ListenerTest1 extends RedisListener<BankEntity> {

	public static final String topic = "redis_topic_bank";

	public ListenerTest1() {
		super(topic);
	}

	@Override
	protected void receive(BankEntity message) {
		log.info("订阅到redis消息，topic={}，message={}", topic, JacksonUtil.toJson(message));
	}
}
